require('normalize.css');

import React from 'react';
import MovieFrontBox from 'components/MovieFrontBox'
import TextBox from 'components/TextBox'

class AppComponent extends React.Component {
  constructor(props){
    super(props)
    this.state = {comment: ''}
  }
  render() {

    return (
      <div className="index">
        <MovieFrontBox
         title="摩登时代"
         director="Charles Chaplin"
         imgUrl="http://www.filmstory.org/images/posters/492/small/modern_times.jpeg"
         casts={['Charles Chaplin', 'Paulette Goddard']}
         desc="卓别林代表作"
         comment={this.state.comment}
         onCommentChange={ val => this.setState({comment: val, v:val}) }
         onSubmitComment={ () => window.console.log(this.state.comment)}
        />
        <TextBox autoFocus={true}/>
      </div>
    );
  }
}

AppComponent.defaultProps = {
};

export default AppComponent;
